package com.sc.javaee.mapper;

import com.sc.javaee.pojo.Cart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CartMapper {
    int deleteByPrimaryKey(Integer cartId);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer cartId);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    Cart select(Integer id);

    int batchUpdate(Cart c);
    //查询所有购物车中的商品
    List<Cart> selectCard();
    //批量删除购物车中的信息
    //int batchDel(@Param("ids")Integer[] ids,@Param("userId")Integer userId);
    int batchDel(Integer[] ids);
}